﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CocisWeb.src;
using CocisModel;
using System.Xml;

namespace CocisWeb
{
    public partial class Left : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                UserInfo userInfo = Session["userInfo"] as UserInfo;
                string roleId = userInfo.RoleID.ToString();
                this.LabelUserName.Text = userInfo.UserName;
               
                
                if (roleId == "1")
                {

                    this.xmlDS.DataFile = "~/xml/Menu_Admin.xml";            

                }
                if (roleId == "2")
                {

                    this.xmlDS.DataFile = "~/xml/Menu_Engineer.xml";

                }
                if (roleId == "3")
                {

                    this.xmlDS.DataFile = "~/xml/Menu_TeamLeader.xml";

                }
                if (roleId == "4")
                {

                    this.xmlDS.DataFile = "~/xml/Menu_PlatFormOwner.xml";

                }
                if (roleId == "6")
                {

                    this.xmlDS.DataFile = "~/xml/Menu_Consultant.xml";

                }

            }
        }
    }
}
